import 'package:boss/models/takeout_order_list_data.dart';
import 'package:json_annotation/json_annotation.dart';

part 'search_takeout_data.g.dart';

@JsonSerializable()
class SearchTakeoutData extends Object {
  @JsonKey(name: 'total')
  int total;

  @JsonKey(name: 'totalPage')
  int totalPage;

  @JsonKey(name: 'items')
  List<TakeoutOrderItem> items;

  SearchTakeoutData(
    this.total,
    this.totalPage,
    this.items,
  );

  factory SearchTakeoutData.fromJson(Map<String, dynamic> srcJson) => _$SearchTakeoutDataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$SearchTakeoutDataToJson(this);
}
